import 'dart:async';

import 'package:flutter/material.dart';
import 'package:flutterhello/api/api.dart';
import 'package:flutterhello/controller/Controller.dart';
import 'package:flutterhello/my_app.dart';
import 'package:get/get.dart';

class SpPage extends StatefulWidget {
  @override
  _SpPageState createState() => _SpPageState();
}

class _SpPageState extends State<SpPage> {
  @override
  void initState() {
    // TODO: implement initState
    super.initState();
    final controller = Get.put(Controller());
    Timer t = Timer(Duration(seconds: 1), () {
      if (controller.userInfo != null) {
        Get.offAll(MyApp());
      }
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Image.asset(
        'images/img/sp.jpg',
        fit: BoxFit.fill,
      ),
    );
  }
}
